package com.back_end.mysql.outdata.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@Table(catalog = "outdata",schema = "outdata",
        indexes = {@Index(name = "authorIdIndex", columnList = "authorId"),@Index(name = "affiliationIdIndex", columnList = "affiliationId")},
        uniqueConstraints = {@UniqueConstraint(name = "paaConstraint",columnNames = {"paperId", "authorId", "affiliationId"})})
@NoArgsConstructor
public class PaperAuthorAffiliation{
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    Long id;
    Long paperId;
    Long authorId;
    Long affiliationId;
    
    Integer authorSequence;
    String authorName;
    String affiliationName;
}
